
import BasicView from '@/layouts/BasicView.vue'
import BlankView from '@/layouts/BlankView.vue'

const RouteView = {
  name: 'RouteView',
  render: h => h('router-view')
}

/**
 * 基础路由表
 */
export const constantRouters = [
  {
    path: '/login',
    name: 'Login',
    meta: { title: "登录页面" },
    component: () => import('@/views/login/Login.vue')
  },
  {
    path: '*',
    name: '404',
    meta: { title: "404页面" },
    component: () => import('@/views/exception/404.vue')
  },
  {
    path: '/403',
    name: '403',
    meta: { title: "403页面" },
    component: () => import('@/views/exception/403.vue')
  },
  {
    path: '/',
    name: '首页',
    meta: { title: "首页" },
    component: BasicView,
    redirect: '/login',
    children: [
      {
        path: '/demo1',
        name: 'demo1',
        meta: { title: '演示页面1', icon: 'file-ppt' },
        component: () => import('@/views/examples/DemoOne.vue')
      },
      {
        path: '/parent1',
        name: '父级路由1',
        meta: { title: '父级路由1', icon: 'dashboard', },
        component: BlankView,
        children: [
          {
            path: 'demo2',
            name: 'demo2',
            meta: { title: '演示页面1', icon: 'file-ppt' },
            component: () => import('@/views/examples/DemoOne.vue')
          }
        ]
      },
    ]
  },
]
